Modern computer systems are often powerful enough to run more than one operating system in parallel. For this purpose, the physical resources of a computer system, e.g. processor cores, memory, peripheral devices, network resources, etc. are usually distributed over logical partitions. For a logical partition, a virtual machine representing an image of hardware and resources allocated to the logical partition may be provided. The virtual machine often closely mirrors the underlying hardware. It is however possible that the virtual machine presented represents hardware with a very different setup than the physically present hardware or actual hardware of the computer system.
On a logical partition, an operating system may be run, which may be called a guest operating system. It is possible and quite common for different logical partitions to run different operating systems, e.g. one logical partition may be running a GNU/Linux-based system and another logical partition may be running a more tradition Unix-like operating system such as AIX or for example a specialized operating system for embedded systems such as SmartDSP OS. For systems with more than one processor core, it is feasible to provide logical partitions having at least one processor core. It is also possible to run more than one logical partition respectively operating system on one core, e.g. by utilizing hyperthreading technologies.
For managing the hardware respectively physical resources, a hypervisor is sometimes provided. The hypervisor can be implemented in hardware, firmware, software or as any combination of these. An example for a hypervisor is the Xen-hypervisor. In many cases, the hypervisor allocates physical resources to logical partitions and provides interfaces between the hardware and guest operating systems running on the logical partitions. It may also provide the virtual machine seen by the guest operating systems. The hypervisor usually runs with the highest privilege level, in a so-called hypervisor mode, whereas guest operating systems run in a so-called supervisor mode with a lower level of privileges. In particular, the hypervisor usually controls access of the guest operating systems to the physical resources. In some cases it may even be useful to operate a hypervisor if only one operating system is being run.
A computer system may be implemented such that a guest operating systems does not even know that it is connected to a virtual machine under control of a hypervisor. It is also possible that the presence of the hypervisor is made transparent to the operating system. This approach is usually called paravirtualization. An operating system may also be run bare-metal directly on hardware without a hypervisor providing an additional layer of control structure.
In many cases, modern operating systems have a feature called virtual memory. Using virtual memory, it is possible to present a large and homogeneous memory structure to individual processes run under control of an operating system, e.g. user-applications, as well as to the operating system itself. In particular, virtual memory may present a larger amount of memory to applications than the actual physical random access memory (RAM) comprises. Should the memory requirements exceed the physical memory of the RAM, such virtual memory systems usually use a peripheral hardware storage device like a hard disk to “swap” data between the hard disk and the RAM. Virtual memory is usually directly controlled by an operating system independently of a hypervisor.
An operating system usually has its own model of physical resources present as well. Such a model may also pertain to a virtual machine presented by a hypervisor. The physical model does not necessarily describe the actual hardware the operating system runs on. In particular, physical addresses used by an operating system are not necessarily identical to the physical addresses of actual hardware as used by the hardware respectively a hypervisor. The physical addresses used by an operating system in its physical model are often called logical physical addresses to distinguish them over actual physical addresses. Moreover, different operating systems use different models of physical resources. Thus, for a computer system with a hypervisor, provisions have to be made to translate the physical model of an operating system, respectively, the logical physical addresses as seen by the operating system, into real or actual physical addresses. U.S. Pat. No. 6,877,158 B1 describes an example of a hypervisor mediating address translation between a physical system and different operating systems.